<!DOCTYPE html>

<?php

if(isset($name)&&isset($pwd)&&$pwd!=''&&$name!=''){
    if('login'==$request) {
                    header("Location:./iframe/iframe.php?username=${name}");
                    echo 'Login successful';
                    exit;
    }
    else if('register'==$request){
                //TODO 为新用户创建目录
                mkdir("./tmp/${name}/",0777,true);
                echo 'register successful </br>';
                echo '<br/><a href="./index.php">back to login</a>';

    }

}else{
	echo 'Please input correctly!';
	echo '<br/><a href="./index.php">back</a>';
}

?>
<html>
<head>

    <meta charset="utf-8" />
    <title>get GET value</title>

</head>
<body>
<h1>

</h1>
</body>

</html>

